#include <bits/stdc++.h>
using namespace std;
int n;
int a[100005],bucket[100005];
set<int> b;
int sum[100005],temp;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        b.insert(a[i]);
        bucket[a[i]]++;
    }
    int ans=n;
    for(int i:b){
        temp++;
        sum[temp]=sum[temp-1]+bucket[i];
    }
    int j=1;
    for(int i:b){
        int sha=min(sum[j-1],bucket[i]);
        ans-=sha;
        sum[j]-=sha;
        j++;
    }
    cout<<ans;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
